OrderedBag.View Class

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The OrderedBag<T>.View class is used to look at a subset of the items inside an ordered bag. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
[SerializableAttribute]
public class View : CollectionBase<T>
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class View _
	Inherits CollectionBase(Of T)
Visual C++
[SerializableAttribute]
public ref class View : public CollectionBase<T>

Remarks

Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made to the view, the underlying bag changes accordingly.

Typically, this class is used in conjunction with a foreach statement to enumerate the items in a subset of the OrderedBag. For example:

 Copy imageCopy Code
             foreach(T item in bag.Range(from, to)) {
                // process item
             }
            

Inheritance Hierarchy

System..::Object
  Wintellect.PowerCollections..::CollectionBase<(Of <T>)>
    Wintellect.PowerCollections..::OrderedBag<(Of <T>)>..::View

See Also